You are here: Statements and Functions > ForResource()
Syntax samples
FORRESOURCE()
IF FORRESOURCE() THEN GET Res1
This function returns TRUE if the object executing the shift or break logic is a resource.
All Shift or Break logic.
Example
A shift called DAYS.SFT has five resources and eight locations assigned to it. When the resources go off-shift, it is desired to write the resource name and simulation time to a file called RES_TIME. The following logic is placed in the off-shift logic.
IF FORRESOURCE() THEN
BEGIN
XWRITE res_time, "Shift for" $ RES(Resource()) $ "ended at" $ Clock(hr) $ "."
END
FORLOCATION(). Also see Shift & Break Logic.